//Create a Role instance as object
Role newRoleInstance = new SimpleRole("someRole");
// let's create the new role
identityManager.add(newRoleInstance);
// let's retrieve the role information and see if they are properly stored
Role storedRoleInstance = identityManager.getRole(newRoleInstance.getName());
assertNotNull(storedRoleInstance);
assertEquals(newRoleInstance.getKey(), storedRoleInstance.getKey());
assertEquals(newRoleInstance.getName(), storedRoleInstance.getName());